<template>
  <div class="not-found">
    <h1>404 - 页面未找到</h1>
    <p>您访问的页面不存在，请检查 URL 是否正确。</p>
    <v-btn color="primary" @click="goBack">返回首页</v-btn>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';

const router = useRouter();

// 返回首页的方法
const goBack = () => {
  router.push('/');
};
</script>

<style scoped>
.not-found {
  text-align: center;
  margin-top: 50px;
}

h1 {
  font-size: 3rem;
  color: #e74c3c;
}

p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}
</style>
